//$(document).ready(function(){
//    $(".admin tr:even").addClass("odd");
//});

function changeQuantity(product_id){
    var quantity =  $("#cart_quantity_"+product_id).val();
    var url = '/store/change_cart_quantity/' + product_id + '?quantity=' + quantity
    $.getJSON(url, function(json){
        $("#cart_price_"+product_id).text(json.item_price)
        $("#cart_total_price").text(json.total_price)
    });
}

function removeFromCart(product_id){
    var url = '/store/remove_from_cart/' + product_id
    $.get(url, function(data){
        $("#cart_item_"+product_id).remove();
        $("#cart_total_price").text(data)
    });
}